<?php
namespace services\models;

/**
 * 品牌信息接口
 *
 * @author huipeng.teng@liketry.com
 */
class BrandTable extends \common\models\BrandTable {
    public static function getDb() {
        return \Yii::$app->db;
    }

    /**
     * 通过品牌ID获取品牌信息
     * @param int $brand_id 品牌ID
     * @return array 品牌信息
     */
    public static function findByBrandId($brand_id, $fields = '*') {
        $var = self::find()->select($fields)->where('id=:id', [':id' => $brand_id])->one();
        return \yii\helpers\ArrayHelper::toArray($var);
    }
}
